import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '费用类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '缴费方式',
    align:"center",
    dataIndex: 'way_dictText'
   },
   {
    title: '价格',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '收费对象',
    align:"center",
    dataIndex: 'name'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '费用类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"fare_type"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入费用类型!'},
          ];
     },
  },
  {
    label: '缴费方式',
    field: 'way',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"fare_way"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入缴费方式!'},
          ];
     },
  },
  {
    label: '价格',
    field: 'price',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入价格!'},
          ];
     },
  },
  {
    label: '收费对象',
    field: 'name',
    component: 'Input',
  },
];
